<template>
    <div >

      <van-row>
        <van-nav-bar
            title="设置"
            fixed
            placeholder
            left-text="返回"
            @click-left="onCancel"
        >
          <template #left>
            <van-icon   color="black" size="22" name="arrow-left" />
          </template>
        </van-nav-bar>

        <van-col span="24" style="margin-top: .5rem;">
          <van-cell-group>
            <van-cell v-for="(item,index) in SettingList" :title="item.title" :value="item.value" is-link />
          </van-cell-group>
        </van-col>
        <van-col span="24" style="margin-top: .5rem;">
          <van-button @click="onLogout" color="#f0f0f0" block plain hairline type="info"><span style="color: #f52443;">退出登录</span></van-button>
        </van-col>

      </van-row>

    </div>
</template>

<script>
export default {
  name: "Setting",
  data(){
    return{
      SettingList:[
        {title:'账号与安全',value:'修改密码',url:''},
        {title:'支付设置',value:'支付密码',url:''},
        {title:'意见与反馈',value:'',url:''},
        {title:'隐私',value:'',url:''},
        {title:'关于我们',value:'',url:''},
      ]
    }
  },
  methods:{
    onCancel() {
      this.$router.replace("/Info");
    },
    onLogout(){
      // 自定义加载图标
      this.$toast.loading({
        message: '退出登录中...',
        forbidClick: true,
        onClose:()=>{

          // console.log("aaa")
          this.$router.replace("/Login");
        }
      })

    }
  }
}
</script>

<style scoped>
.cateTitle{
  font-size: 1.5em; font-weight: bold; padding-bottom: 10px;
}
.catePrice{
  font-size: 1em; color: #e74c3c; display: block;white-space: nowrap; overflow: hidden;  text-overflow: ellipsis; width: 10rem; font-weight: bold; padding-bottom: 10px;
}
.cateNum{
  font-size: 1em; color: #e74c3c; font-weight: bold; padding-bottom: 10px;
}
</style>
